# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=notepadqq
pkgver=1.4.8
pkgrel=1
pkgdesc="Notepad++-like text editor for Linux"
url="https://notepadqq.altervista.org/"
arch="x86 x86_64"
license="GPL-3.0-only" # No source code headers
depends="coreutils qt5-qtwebkit qt5-qtsvg qt5-qtbase"
makedepends="qt5-qtbase-dev qt5-qttools-dev qt5-qtsvg-dev
	qt5-qtwebkit-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	sed -i \
		-e 's:/lib/notepadqq/:/bin/:' \
		src/ui/ui.pro
	sed -i -e 's:\.\./\.\.:\.\.:' src/ui/notepadqq.cpp
}

build() {
	qmake-qt5 PREFIX=/usr LRELEASE=/usr/lib/qt5/bin/lrelease notepadqq.pro
	make
}

check() {
	make check
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}

sha512sums="fa1937b75a378fb81486a871a5b736f6ba216cd4b71f99e342e457de65ea034c2ee4d2c9f42754c4737671ccb1083fb1e6c946240ab2094042125430578141fa  notepadqq-1.4.8.tar.gz"
